Only apply clip_region shape for viewable windows
authorAlexander Larsson <alexl@redhat.com>
Sat, 18 Jul 2009 19:51:11 +0000 (21:51 +0200)
committerAlexander Larsson <alexl@redhat.com>
Sat, 18 Jul 2009 21:15:57 +0000 (23:15 +0200)
This fixes a problem where the clip region is not yet calculated

gdk/gdkwindow.c

index e62311e519fbe7791bf2c1fb0c2a3516c9bd7272..7ee32c0d20e6ed1e5ff18dcf73477aef67afe346 100644 (file)
@@ -1579,7 +1579,8 @@ gdk_window_ensure_native (GdkWindow *window)
 
   /* The shape may not have been set, as the clip region doesn't actually
      change, so do it here manually */
-  GDK_WINDOW_IMPL_GET_IFACE (private->impl)->shape_combine_region ((GdkWindow *)private, private->clip_region, 0, 0);
+  if (private->viewable)
+    GDK_WINDOW_IMPL_GET_IFACE (private->impl)->shape_combine_region ((GdkWindow *)private, private->clip_region, 0, 0);
 
   reparent_to_impl (private);